<template>
  <div>
      <div class="item" v-for="item of detail" :key="item.id" >
          <img :src="item.pic" alt="">
          <p>{{item.title}}</p>
      </div>
  </div>
</template>

<script>
import axios from 'axios';
export default {
    data(){
        return{
            detail:[]
        }
    },
    mounted(){
        console.log(this.$route.params);
        var {id} = this.$route.params
        axios.get(`http://47.108.197.28:4000/api/movieDetail?id=${id}`).then(res=>{
            console.log(res.data.res);
            this.detail = res.data.res
        })
        
    }
}
</script>

<style>

</style>